<div class="row">
	<div class="col-md-8 col-md-offset-2" >
		<div class="panel-default panel">
			<div class="panel-heading">
				<strong>用户管理</strong>
					<span class="pull-right">权限管理(请输入需要更改权限用户的邮箱或昵称)</span>
			</div>
			<div class="panel-body media " style="min-height: 800px">
						<ul class="list-group">
							<li class="form-inline  list-group-item" >
								<input type="checkbox" class="checkbox" name="check" />&nbsp;&nbsp;全选

								<div class="btn btn-group" >
									<%=link_to '添加分组到','#',class: 'btn btn-default' %>
									<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
										<span class="caret"></span>
									</button>
									<ul class="dropdown-menu dropdown-menu-right ">
										<% ApplicationController::ROLE_SET.to_a.each do |rol|%>
											<li><%= rol%></li>
										<%end%>
									</ul>
								</div>
							</li>


							<li class=" list-group-item form-inline">
								<input type="checkbox" class="checkbox " name="checks"/>
								<div class="" style="display: inline-block;vertical-align: middle">
									<div class=" media " style="display: inline">
										<div class="media-heading media-left">
											<%=gravatar_for(@user,size: "40")%>
										</div>
										<div class="media-body media-middle" style="width: auto">
											<%= @user.name%>
										</div>
									</div>
								</div>

								<div class="btn btn-group pull-right" style="display: inline">

									<%=link_to '添加分组到','#',class: 'btn btn-default' %>
									<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
										<span class="caret"></span>
									</button>
									<ul class="dropdown-menu dropdown-menu-right ">
										<% ApplicationController::ROLE_SET.to_a.each do |rol|%>
											<li><%= rol%></li>
										<%end%>
									</ul>
								</div>
							</li>

					</ul>
			</div>
		</div>
	</div>
</div>
<div>

	<%if @user.roles.present?%>
		<%@user.roles.each do |role|%>
			<span> <%= role.name%></span>
		<%end%>
	<%else%>
		<span> 会员 </span>
	<%end%>

</div>